<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        .list{width:200px;background: #efefef;position: absolute;left:0;top:0;display:none}
    </style>
</head>
<body>
    <div class="list">
        <p>列表项1</p>
        <p>列表项2</p>
        <p>列表项3</p>
        <p>列表项4</p>
    </div>
</body>
<script>

    var list = document.querySelector(".list");

    document.oncontextmenu = function(eve){
        var e = eve || window.event;
        // console.log(1);

        stopDefault(e);

        list.style.display = "block";
        list.style.left = e.pageX + "px";
        list.style.top = e.pageY + "px";
    }

    document.onclick = function(){
        list.style.display = "none";
    }

    function stopDefault(e){
        if(e.preventDefault){
            e.preventDefault();
        }else if(e.returnValue !== undefined){
            e.returnValue = false;
        }else{
            return false;
        }
    }

</script>
</html>